<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            margin-top: 9px;
            text-align: center;
        }
        html,body {
            height: 100%;
            width: 100%;
        }
        .day {
            background-color: white;
        }
        .night {
            background-color: gray;
        }
    </style>
</head>
<body class="day">
    <div class="container">
        <div>这是一篇小说</div>
        <div>这是一篇小说</div>
        <div>这是一篇小说</div>
        <div>这是一篇小说</div>
        <div>这是一篇小说</div>
        <div>
            <span>
                <input type="button" id="SetMode" value="白天模式">
            </span>
        </div>
    </div>
</body>
<script>
    let Mode = document.querySelector('#SetMode');
    let body = document.querySelector('body');
    Mode.onclick = function()
    {
        if(Mode.value == '白天模式')
        {
            Mode.value = '夜间模式';
            body.className = 'night';
        }
        else
        {
            Mode.value = '白天模式';
            body.className = 'day';
        }
    }
</script>
</html>